1. Technical Field
The present invention relates to a method and system for data processing in general, and in particular to a method and system for recovering mirrored logical data volumes within a data processing system. Still more particularly, the present invention relates to a method and system for recovering mirrored logical data volumes within a computer system after a system failure.
2. Description of the Prior Art
Generally speaking, a storage system within a computer is typically made up of one or more logical volume groups, which are, in turn, made up of multiple logical volumes that are physically represented by physical volumes. The logical volume groups, the logical volumes, and the physical volumes are organized in a hierarchical fashion managed by a logical volume manager. Each physical volume is divided into physical partitions, each of which is equivalent to a segment size (i.e., the actual units of space allocation) on a hard disk. Although data on a logical volume appear to be contiguous to a user, these data can be non-contiguously stored on one or more physical volumes. This allows the logical volumes to be resized and relocated, and their contents to be replicated in a rapid fashion.
In a mirrored computer system, each logical volume has a mirror (or redundant) logical volume. Details of a mirrored computer system can be found in AIX 6000 System Guide, McGraw-Hill, New York, 1996, the pertinent of which is incorporated by reference herein. After a system failure, such as a hang-up or crash, the mirrored logical volumes must be resynchronized. The resynchronization should be performed before the storage system is accessed; otherwise, users may access inconsistent data as a result of write requests that were in-flight. In other words, write operations to specific partitions in a logical volume may not have been completed in both mirrored partitions at the time of the system failure; and as a result, data stored in the mirrored partitions may be inconsistent. The present disclosure provides a method for recovering mirrored logical volumes within a computer system after a system failure.
In accordance with a preferred embodiment of the present invention, a computer system includes mirrored logical volumes that can be accessed by multiple nodes. Mirrored in-flight logs are provided for the mirrored logical volumes. The mirrored in-flight logs include multiple node partitions, each node partition corresponding to one of the nodes. Furthermore, each entry within the mirrored in-flight logs indicates whether or not a write operation is currently being performed by at least one of the nodes. After an abnormal termination of one of the nodes due to, for example, a system failure, one of the remaining nodes is automatically selected to copy data from one of the mirrored logical volumes to another of the mirrored logical volumes, according to the entries within one of the mirrored in-flight logs.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.